<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>View Products Sample- Populate DataSet through ODP.NET using
Visual Basic .NET - Readme</title>
		 		
  <link rel="stylesheet" href="otn.css" type="text/css">
</head>
	<body bgcolor="#ffffff">
<a name="SAMPLE_NAME"></a>
<table width="100%" align="center">
  <tbody>
    <tr>
      <td width="100%">
      <h1 class="heading1"> <font size="+2">View Products Sample -
Populate Dataset         through ODP.NET using Visual Basic .NET
(VB.NET)</font></h1>
      <h2 class="heading2">Table of Contents</h2>
      <ul class="list">
        <li><a href="#objective">Objective of the Sample Application</a></li>
        <li><a href="#overview">Overview of the Sample Application</a> </li>
        <li> <a href="#usernotes">User Notes with Screen Shots </a></li>
        <li><a href="#software">Required Software</a></li>
        <li><a href="#extract">Extracting the Sample</a></li>
        <li><a href="#database">Database Setup</a></li>
        <li><a href="#prepare">Preparing and Running the sample</a></li>
        <li> <a href="#descsamples">Description of Sample Files</a></li>
      </ul>
      <table border="0" width="96%" height="20">
        <tbody>
          <tr>
            <td width="62%" height="15">
            <h2 class="heading2"><a name="objective"></a> Objective of
the Sample               Application</h2>
            </td>
            <td width="38%" align="right"> <a href="#SAMPLE_NAME"
 class="paragraph"> Back To Top</a> </td>
          </tr>
        </tbody>
      </table>
      <p class="tabletext">The purpose of this sample application is to
demonstrate         how to populate a DataSet through Oracle Data
Provider for .NET (ODP.NET)         using VB.NET . </p>
      <table border="0" width="96%">
        <tbody>
          <tr>
            <td width="62%">
            <h2 class="heading2"> <a name="overview"></a>Overview of
the Sample               Application</h2>
            </td>
            <td width="38%" align="right"> <a href="#SAMPLE_NAME"
 class="paragraph"> Back To Top</a> </td>
          </tr>
        </tbody>
      </table>
      <p class="tabletext">ODP.NET offers faster and reliable access to
Oracle         Database by using Oracle Native APIs. ODP.NET provides
features to access         any .NET application. The data access
through ODP.NET can be done using         a collection of classes
contained in <code class="nocolor">Oracle.ManagedDataAccess</code> assembly. <code
 class="nocolor">Figure 1.1 </code>describes how data is accessed
using         ODP.NET.&nbsp; </p>
      <p class="tabletext"><img src="images/tech2.gif"></p>
      <p class="tabletext"><code class="nocolor">Figure 1.1 Data Access
Using ODP.NET&nbsp; </code></p>
      <p class="tabletext"><code class="nocolor">DataSet</code> is a
major component         of ADO.NET. It is an in-memory cache of the
data retrieved from the database. <code class="nocolor">OracleDataAdapter</code>&nbsp;
represents a set         of data commands and a database connection
that is used to fill the <code class="nocolor">DataSet</code> based on
the query given.&nbsp; <code class="nocolor">OracleCommand</code>
represents SQL statements to execute against datasource. <code
 class="nocolor">OracleConnection</code> is used to build the database
connection.&nbsp; </p>
      <p class="tabletext">This Visual Basic .NET (VB.NET) sample
application         displays a product catalog for a product store.
When this sample is run,         a list of products from database
appears in a <code class="nocolor">DataGrid</code> (in         tabular
format). The<code class="nocolor"> DataGrid</code> gets populated       
from a <code class="nocolor">DataSet</code> which is filled by a
DataSource         using <code class="nocolor">OracleDataAdapter</code>.
Hence demonstrating         how to populate <code class="nocolor">DataSet</code>
through Oracle Data         Provider for .NET (ODP.NET).&nbsp; </p>
      <p>
      <table border="0" width="100%">
        <tbody>
          <tr>
            <td width="61%">
            <h2 class="heading2"> <a name="usernotes"></a> User Notes
with Screen               Shots</h2>
            </td>
            <td width="39%" align="right"> <a href="#SAMPLE_NAME"
 class="paragraph"> Back To Top</a> </td>
          </tr>
        </tbody>
      </table>
      </p>
      <p class="tabletext"><span text="" class="OTN_TEXT">When this
sample application         is run, a list of Products from database is
displayed as shown in figure         1.2,&nbsp;on clicking the 'Close'
button, the application gets closed.&nbsp;</span> </p>
      <p><span class="OTN_TEXT"><img src="images/screenshot.gif"
 height="413" width="623"><br>
      </span></p>
      <p><code class="nocolor">Figure 1.2: Screen Shot for DataSet
Populate VB         Sample&nbsp;</code></p>
      <table border="0" width="100%">
        <tbody>
          <tr>
            <td width="61%">
            <h2 class="heading2"> <a name="software"></a> Required
Software</h2>
            </td>
            <td width="39%" align="right"> <a href="#SAMPLE_NAME"
 class="paragraph">Back             To Top</a> </td>
          </tr>
        </tbody>
      </table>
      <ul>
        <li>
          <p><span text="text" class="tabletext">Visual Basic.NET
(VB.NET) installed             with Visual Studio 2005/2008/2010/2012.</span></p>
        </li>
        <li>
          <p><span text="text" class="tabletext"><font
 face="Arial,Helvetica">Oracle11g             Database or higher running
SQL*Net TCP/IP listener (can be downloaded <a
 href="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html">here</a> )</font> </span></p>
        </li>
        <li>
          <p><span text="text" class="tabletext"><font
 face="Arial,Helvetica">Oracle             Data Provider for .NET
(ODP.NET) (can be downloaded <a
 href="http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html">here</a> )</font></span> </p>
        </li>
      </ul>
      <table border="0" width="100%">
        <tbody>
          <tr>
            <td width="61%">
            <h2 class="heading2"> <a name="extract"></a> Extracting the
Sample </h2>
            </td>
            <td width="39%" align="right"> <a href="#SAMPLE_NAME"
 class="paragraph">Back             To Top</a> </td>
          </tr>
        </tbody>
      </table>
      <p class="paragraph"><span text="" class="OTN_TEXT">Unzip <code
 class="nocolor">DSPopulateVB.zip</code> using Winzip or command utility
to your convenient directory </span><span class="OTN_TEXT">referred  
to as </span><span class="PropertyName"><code class="nocolor">&lt;Extract_Dir&gt;</code></span><span
 text="" class="OTN_TEXT">.         Extraction of the zip file
results&nbsp;in the creation of <code class="nocolor">'DSPopulateVB'</code>
directory.&nbsp; </span><span class="OTN_TEXT">Refer <a
 href="#descsamples">Description         of Sample Files</a> section
for more details.&nbsp;</span> &nbsp; &nbsp; </p>
      <table border="0" width="100%">
        <tbody>
          <tr>
            <td width="61%">
            <h2 class="heading2"> <a name="database"></a> Database Setup</h2>
            </td>
            <td width="39%" align="right"> <a href="#SAMPLE_NAME"
 class="paragraph">Back             To Top</a> </td>
          </tr>
        </tbody>
      </table>
      <p><font face="Arial, Helvetica, sans-serif"><span
 class="paragraph">Connect         to your database as any user and
run the script <code class="nocolor">&lt;Extract_Dir&gt;\DSPopulateVB\Setup\DatabaseSetup.sql</code>
at the&nbsp;</span></font><span class="paragraph"><font
 face="Arial, Helvetica, sans-serif">SQL         prompt</font> </span> <br>
      <tt><font face="Arial, Helvetica, sans-serif"><span class="code">SQL&gt;
@<code class="nocolor">&lt;Extract_Dir&gt;</code>\DSPopulateVB\Setup\DatabaseSetup.sql</span></font></tt> </p>
      <p><span class="tabletext">This script will prompt for the
username, password         and connectstring. You may choose any
existing username. <code class="nocolor">Products</code> table will get
created in specified users schema. </span></p>
      <p>&nbsp;
      <table border="0" width="100%">
        <tbody>
          <tr>
            <td width="61%">
            <h2 class="heading2"> <a name="prepare"></a> Preparing and
Running               the Sample</h2>
            </td>
            <td width="39%" align="right"> <a href="#SAMPLE_NAME"
 class="paragraph">Back             To Top</a> </td>
          </tr>
        </tbody>
      </table>
      </p>
      <p class="paragraph"><span text="" class="OTN_TEXT">1</span><span
 text="">. Ensure         that the <a href="#database">Database setup</a>
has been completed.&nbsp; </span></p>
      <p class="paragraph"><span text="" class="OTN_TEXT">2. Open <code
 class="nocolor">DSPopulateVB.sln</code> using Visual Studio .NET from </span><span
 class="PropertyName"><code class="nocolor">&lt;Extract_Dir&gt;</code></span><span
 text="" class="OTN_TEXT"><code class="nocolor">\DSPopulateVB</code>
folder.&nbsp; </span></p>
      <p class="paragraph"><span text="" class="OTN_TEXT">3. Edit <code
 class="nocolor">ConnectionParams.vb</code> file to change the database
connection parameters like username, password         and TNSNames
for&nbsp;the database.You need to input the same values of        
connection parameters as given while doing the <a href="#database">Database
Setup</a>. Save this file.&nbsp; </span></p>
      <p><span text="text" class="tabletext">4. Ensure that the
following .NET         Component References have been added to <code
 class="nocolor">DSPopulateVB</code> project:&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System,&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.Data,&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.Drawing,&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.Windows.Forms,&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.XML, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Oracle.ManagedDataAccess.&nbsp; </span> </p>
      <blockquote class="tabletext">To add the above .NET
Components&nbsp; <br>
a)Go to Menu -&gt;View-&gt; Solution Explorer.&nbsp; <br>
b)Right click on <code class="nocolor">DSPopulateVB</code> project,
choose 'Add Reference'.&nbsp; <br>
c)Choose the above .NET Components from the list displayed.&nbsp; <br>
d)Click 'Select', then OK.&nbsp; <br>
e) The chosen .NET component gets added to the project.&nbsp;</blockquote>
      <p class="paragraph"><span text="" class="OTN_TEXT">5. Build and
run the sample. </span></p>
      <table border="0" width="100%">
        <tbody>
          <tr>
            <td width="58%">
            <h2 class="heading2"> <a name="descsamples"></a> Description
of Sample               Files</h2>
            </td>
            <td width="42%" align="right"> <a href="#SAMPLE_NAME"
 class="paragraph">Back             To Top</a> </td>
          </tr>
        </tbody>
      </table>
      <p><span class="paragraph">Following is the directory structure
of the </span><span text="" class="OTN_TEXT"><code class="nocolor">DSPopulateVB.zip</code> </span><span
 class="paragraph"><code class="nocolor"> : </code></span></p>
      <table border="1" cols="3" width="98%" class="tabletext">
        <tbody>
          <tr>
            <td width="23%"><b>Directory</b></td>
            <td width="18%"><b>File Name</b></td>
            <td width="59%"><b>Description</b></td>
          </tr>
          <tr>
            <td rowspan="2" class="OTN_TEXT" width="23%"><code
 class="nocolor">DSPopulateVB\doc</code></td>
            <td class="tabletext" width="18%">Readme.html</td>
            <td class="tabletext" width="59%">This file</td>
          </tr>
          <tr>
            <td class="tabletext" width="18%">otn.css</td>
            <td class="tabletext" width="59%">This is a cascading
stylesheet applied             to Readme.html</td>
          </tr>
          <tr>
            <td class="OTN_TEXT" width="23%"><code class="nocolor">DSPopulateVB\doc\images</code></td>
            <td width="18%" class="tabletext">*.gif</td>
            <td width="59%" class="tabletext">This folder contains
images used in             the Readme.html file</td>
          </tr>
          <tr>
            <td class="OTN_TEXT" rowspan="5" width="23%" colspan="1"><code
 class="nocolor">DSPopulateVB\src</code><code class="nocolor"></code></td>
            <td class="tabletext" width="18%">ConnectionParams.vb</td>
            <td class="tabletext" width="59%">This VB file contains
parameters for             database connection</td>
          </tr>
          <tr>
            <td class="tabletext" width="18%">ViewProductsFrm.vb</td>
            <td class="tabletext" width="59%">This VB file contains
source code             for UI for sample application and its
functionality</td>
          </tr>
          <tr>
            <td class="tabletext" width="18%">DSPopulateVB.csproj</td>
            <td class="tabletext" width="59%">VB project file</td>
          </tr>
          <tr>
            <td class="tabletext" width="18%">ViewProductsFrm.resx</td>
            <td class="tabletext" width="59%">.NET XML Resource
Template (this file             gets automatically generated when a
Visual Studio Project is created)</td>
          </tr>
          <tr>
            <td style="vertical-align: top;">DSPopulateVB.sln</td>
            <td style="vertical-align: top;">Visual Studio Solution</td>
          </tr>
          <tr>
            <td class="OTN_TEXT" width="23%"><code class="nocolor">DSPopulateVB\Setup</code></td>
            <td class="tabletext" width="18%">DatabaseSetup.sql</td>
            <td class="tabletext" width="59%">This is a SQL script
file&nbsp;</td>
          </tr>
        </tbody>
      </table>
      </td>
				</tr>
			
  </tbody> 		
</table>
	
</body>
</html>
